package com.byedu.domain.course.vo;

import java.io.Serializable;

/**
 * Created by jason on 2017/5/20.
 */
public class ReturnWeiXinUserVO implements Serializable{
    private static final long serialVersionUID = 8676400847415488935L;
    /*微信OPENID  主键*/
    private String openId;
    /*微信昵称*/
    private String name;
    /*微信头像*/
    private String imgUrl;

    /*用户编号  bay_user表的主键*/
    private String userId;

    private String phone;

    private boolean flag;

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }


    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }


    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    private String message;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

    public ReturnWeiXinUserVO() {
    }
    public ReturnWeiXinUserVO(String message) {
        this.flag = false;
        this.message = message;
    }
    public ReturnWeiXinUserVO(String message,WeiXinUserVO weiXinUserVO) {
        this.flag = false;
        this.message = message;
        if(weiXinUserVO!=null) {
            this.openId = weiXinUserVO.getOpenId();
            this.phone = weiXinUserVO.getCellPhone();
            this.userId = weiXinUserVO.getUserId();
            this.name = weiXinUserVO.getNickname();
            this.imgUrl = weiXinUserVO.getHeadImgUrl();
        }
    }
    public ReturnWeiXinUserVO(WeiXinUserVO weiXinUserVO) {
        this.flag = true;
        this.message = "用户信息获取成功";
        if(weiXinUserVO!=null) {
            this.openId = weiXinUserVO.getOpenId();
            this.phone = weiXinUserVO.getCellPhone();
            this.userId = weiXinUserVO.getUserId();
            this.name = weiXinUserVO.getNickname();
            this.imgUrl = weiXinUserVO.getHeadImgUrl();
        }
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
}
